package com.qjdchina.sku.converter;

import org.springframework.beans.BeanUtils;

import com.qjdchina.sku.model.RoleBrand;
import com.qjdchina.sku.model.RoleCategory;
import com.qjdchina.sku.model.vo.RoleBrandVO;
import com.qjdchina.sku.model.vo.RoleCategoryVO;

public class RoleBrandConverter {

	private RoleBrandConverter() {

	}
	/**
	 * roleBrand to roleBrandVO
	 * shenpingfeng
	 * 2017年2月15日
	 * @param roleBrand
	 * @return
	 */
	public static RoleBrandVO toRoleBrandVO(RoleBrand roleBrand) {

		RoleBrandVO roleBrandVO = new RoleBrandVO();
		if (null == roleBrand) {
			return roleBrandVO;
		}
		BeanUtils.copyProperties(roleBrand, roleBrandVO);
		return roleBrandVO;
	}
	/**
	 * roleBrandVO to roleBrand
	 * shenpingfeng
	 * 2017年2月15日
	 * @param roleBrandVO
	 * @return
	 */
	public static RoleBrand toRoleBrand(RoleBrandVO roleBrandVO) {

		RoleBrand roleBrand = new RoleBrand();
		if (null == roleBrandVO) {
			return roleBrand;
		}
		BeanUtils.copyProperties(roleBrandVO, roleBrand);
		return roleBrand;
	}

}
